/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package extensions.nifty.control;

import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.builder.ControlDefinitionBuilder;
import de.lessvoid.nifty.builder.PanelBuilder;
import de.lessvoid.nifty.controls.dropdown.builder.DropDownBuilder;

/**
 *
 * @author Manu
 */
public class GamePanelControlDefinition {

    public static final String NAME = "dropDownDialogControl";
    private static CommonBuilders builders = new CommonBuilders();

    public static void register(final Nifty nifty) {

        new ControlDefinitionBuilder(NAME) {

            {
                // here is the drop down control
                panel(new PanelBuilder() {

                    {
                        childLayoutHorizontal();
                        control(builders.createLabel("DropDown:"));
                        control(new DropDownBuilder("dropDown") {

                            {
                                width("*");
                            }
                        });
                    }
                });
            }
        }.registerControlDefintion(nifty);
    }
}
